package cn.sany.cterminal.common.utils;

import java.text.SimpleDateFormat;

/**
 *
 * @Project : forklift
 * @Package : cn.sany.forklift.common.utils
 * @Class : TableUtils
 * @Description : 分表工具类
 * @author : zhouxing
 * @CreateDate : 2020-07-15 13:29:55
 * @version : V0.5
 * @Copyright : 2020 sany.com Inc. All rights reserved.
 * @Reviewed :
 * @UpateLog :    Name    Date    Reason/Contents
 *             ---------------------------------------
 *                ****    ****    ****
 *
 */
public class TableUtils {

    /**
     *  叉车历史数据表前缀
     */
    private static String HISTORY_INFO_PREFIX = "history_info_";
    /**
     *
     * @Method : getTableName
     * @Description : 根据毫秒时间戳获取表名
     * @param timestamp :
     * @return : java.lang.String
     * @author : zhouxing
     * @CreateDate : 2020-07-15 13:30:08
     *
     */
    public static String getHistoryTableName(long timestamp){
        return HISTORY_INFO_PREFIX + new SimpleDateFormat("yyyyMM").format(timestamp);
    }
}
